Communication parameter setting apparatus and control method therefore

ABSTRACT

A communication apparatus in which it is determined whether a communication parameter setting scheme used to provide a partner apparatus with communication parameters is an authentication code scheme or a non-authentication code scheme. Any one of first communication parameters to wirelessly communicate in a first wireless network and second communication parameters to wirelessly communicate in a second wireless network are selected in accordance with the determined setting scheme. The partner apparatus is provided with the selected communication parameters in accordance with the determined setting scheme.

This application claims the benefit of Japanese Patent Application No.2008-005811, filed Jan. 15, 2008, which is hereby incorporated byreference herein in its entirety.

TECHNICAL FIELD

The present invention relates to a communication apparatus and a controlmethod therefor.

BACKGROUND ART

In wireless communication represented by a wireless LAN complying withthe IEEE802.11 standard series, there are many setting items to be setin advance.

The setting items include communication parameters necessary forwireless communication, such as an SSID (Service Set IDentifier) as anetwork identifier, an encryption method, an encryption key, anauthentication method, and an authentication key. It is very troublesomefor a user to set them by manual input.

Various manufacturers have proposed automatic setting schemes for easilysetting communication parameters in a wireless apparatus. In thoseautomatic setting schemes, one apparatus provides another apparatus withcommunication parameters using a procedure predetermined between theseconnected apparatuses and a message, thereby automatically setting thecommunication parameters.

The WPS (Wi-Fi CERTIFIED(TM) for Wi-Fi Protected Setup: Easing the UserExperience for Home and Small Office Wi-Fi(R) Networks,http://www.wi-fi.org/wp/wifi-protected-setup) standard has disclosed acommunication parameter automatic setting scheme.

Communication parameter automatic setting schemes include a scheme (tobe referred to as an authentication code scheme hereinafter) in whichthe user inputs an authentication code to an apparatus, and a scheme (tobe referred to as a non-authentication code scheme hereinafter) in whichthe user does not input an authentication code.

In the authentication code scheme, apparatuses share an authenticationcode, and execute authentication processing between them. When theauthentication processing between two apparatuses succeeds, theseapparatuses perform setting processing. In this case, the authenticationprocessing allows the apparatuses to securely transfer communicationparameters.

In the non-authentication code scheme, upon detecting a terminal whichhas started communication parameter automatic setting, communicationparameters are automatically provided to the terminal. As an example ofthe non-authentication code scheme, there is a scheme of startingsetting processing by pressing the setting start button of an apparatus,and executing, during the setting processing, automatic setting withanother apparatus which has started setting processing in the samemanner. Since an unintended apparatus may be provided with communicationparameters in the non-authentication code scheme, the security level ofthis scheme is lower than that of the authentication code scheme.However, the user need not input an authentication code, thussimplifying the operation.

As described above, in the authentication code scheme, it is possible totransfer communication parameters more securely than in thenon-authentication code scheme. It is therefore desirable to be able toprovide different communication parameters in accordance with acommunication parameter automatic setting scheme to be used.

Conventional communication parameter automatic setting schemes, however,has no mechanism for automatically providing different communicationparameters in accordance with a setting scheme.

Therefore, when communication parameters are to be selectively providedin conventional communication parameter automatic setting, the userneeds to manually select communication parameters to be provided everytime, thereby impairing convenience.

DISCLOSURE OF INVENTION

According to one aspect of the present invention, a communicationapparatus comprises: storage means for storing communication parameters;identification means for identifying a communication parameter settingscheme used to provide a partner apparatus with communicationparameters; selection means for selecting, from the communicationparameters stored in the storage means, communication parameters inaccordance with the setting scheme identified by the identificationmeans; and providing means for providing the partner apparatus with thecommunication parameters selected by the selection means.

According to another aspect of the present invention, a control methodfor a communication apparatus, comprises: identifying a communicationparameter setting scheme used to provide a partner apparatus withcommunication parameters; selecting communication parameters inaccordance with the identified setting scheme; and providing the partnerapparatus with the selected communication parameters.

According to the present invention, it is possible to automatically andselectively provide communication parameters in accordance with acommunication parameter automatic setting scheme, thereby improvingconvenience.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a block diagram showing a block configuration within aterminal;

FIG. 2 is a block diagram showing functional blocks within a parameterproviding terminal according to an embodiment of the present invention;

FIG. 3 is a block diagram showing functional blocks within a parameterreceiving terminal according to the embodiment of the present invention;

FIG. 4 is a view collectively showing a configuration in the embodiment;

FIG. 5 is a flowchart showing the operation of a communication parameterprovider according to the embodiment;

FIG. 6 is a flowchart showing the operation of the authentication codescheme of a communication parameter acceptor according to theembodiment;

FIG. 7 is a flowchart showing the operation of the non-authenticationcode scheme of a communication parameter acceptor according to theembodiment;

FIG. 8 is a sequence chart showing the operation of terminal A andterminal B according to the embodiment; and

FIG. 9 is a sequence chart showing the operation of terminal A andterminal C according to the embodiment.

BEST MODE FOR CARRYING OUT THE INVENTION First Embodiment

A communication apparatus according to the present invention will bedescribed in detail below with reference to the accompanying drawings.Although a case in which a wireless LAN system complying with theIEEE802.11 standard series is used will be explained blow, acommunication method to be used is not necessarily limited to a wirelessLAN.

A hardware configuration in the preferred embodiment will be described.

FIG. 1 is a block diagram showing a configuration of each terminal (tobe described later) according to this embodiment. Reference numeral 101denotes a terminal as a whole; and 102, a control unit which controlsthe terminal as a whole by executing control programs stored in astorage unit 103. The control unit 102 also controls communicationparameter setting with another terminal. The storage unit 103 stores thecontrol programs executed by the control unit 102 and various pieces ofinformation such as communication parameters. Various operations (to bedescribed later) are performed when the control unit 102 executes thecontrol programs stored in the storage unit 103. Reference numeral 104denotes a wireless unit for wireless communication; 105, a display unitwhich provides various displays and has a function capable of outputtingvisually perceivable information like an LCD (Liquid Crystal Display) orLED (Light Emitting Diode), or a function capable of outputting a soundlike a loudspeaker; and 106, a setting button which triggers a start ofcommunication parameter setting. The control unit 102 starts acommunication parameter setting operation (to be described later) bydetecting a user operation of the setting button 106. Reference numeral107 denotes an antenna control unit; 108, an antenna; and 109, an inputunit which inputs an authentication code to be used in the communicationparameter setting operation (to be described later). The storage unit103 stores the input authentication code.

FIG. 2 is a block diagram showing a configuration of software functionalblocks executed by a terminal according to this embodiment, whichprovides communication parameters in the communication parameter settingoperation (to be described later).

Reference numeral 201 denotes a terminal as a whole; and 202, acommunication parameter automatic setting functional block. In thisembodiment, communication parameters necessary for wirelesscommunication, such as an SSID as a network identifier, an encryptionmethod, an encryption key, an authentication method, and anauthentication key are automatically set. In this embodiment, there aretwo communication parameter automatic setting schemes, that is, anauthentication code scheme and a non-authentication code scheme.Reference numeral 203 denotes a packet receiving unit which receivespackets associated with various communications; 204, a packettransmitting unit which transmits packets associated with variouscommunications; and 205, a search signal transmitting unit whichcontrols transmission of apparatus search signals such as aProbe_Request signal. Note that the Probe_Request signal can also bereferred to as a network search signal for searching for a desirednetwork. The search signal transmitting unit 205 executes transmissionprocessing of a Probe_Request signal (to be described later). The searchsignal transmitting unit 205 also performs transmission processing of aProbe_Response signal as a response signal to a received Probe_Requestsignal.

Reference numeral 206 denotes a search signal receiving unit whichcontrols reception of apparatus search signals such as a Probe_Requestsignal from another terminal. The search signal receiving unit 206executes reception processing of a Probe_Request signal (to be describedlater). The search signal receiving unit 206 also performs receptionprocessing of a Probe_Response signal. Note that various pieces ofinformation (self-information) on an apparatus that transmits anapparatus search signal are added to the apparatus search signal.

Reference numeral 207 denotes a network creating unit which creates anetwork. The network creating unit 207 creates a wireless LAN ad-hocnetwork in the wireless parameter setting operation (to be describedlater).

Reference numeral 208 denotes a setting scheme determining unit whichdetermines a setting scheme to use in the communication parameterautomatic setting process. The setting scheme determining unit 208determines whether the storage unit 103 stores an authentication codeinput by the user through the input unit 109. If the storage unit 103stores the authentication code, the setting scheme determining unit 208determines to use the authentication code scheme; otherwise, the unit208 determines to use the non-authentication code scheme.

In the communication parameter automatic setting functional block 202,reference numeral 209 denotes a communication parameter providing unitwhich provides a partner apparatus with communication parameters; and210, a communication parameter selection unit which selectscommunication parameters to be provided to the partner apparatus on thebasis of the communication parameter automatic setting scheme determinedby the setting scheme determining unit 208. Reference numeral 211denotes an automatic setting control unit which controls variousProtocols in communication parameter automatic setting. Thecommunication parameter providing unit 209, and the communicationparameter selection unit 210 execute a communication parameter automaticsetting process (to be described later) under the control of theautomatic setting control unit 211.

FIG. 3 is a block diagram showing a configuration of software functionblocks executed by a terminal according to this embodiment, whichreceives communication parameters in the communication parameter settingoperation (to be described later).

Reference numeral 301 denotes a terminal as a whole; and 302, acommunication parameter automatic setting functional block. In thisembodiment, communication parameters necessary for wirelesscommunication, such as an SSID as a network identifier, an encryptionmethod, an encryption key, an authentication method, and anauthentication key are automatically set. In this embodiment, there aretwo communication parameter automatic setting schemes, that is, theauthentication code scheme and the non-authentication code scheme.Reference numeral 303 denotes a packet receiving unit which receivespackets associated with various communications; 304, a packettransmitting unit which transmits packets associated with variouscommunications; and 305, a search signal transmitting unit whichcontrols transmission of apparatus search signals such as aProbe_Request signal. Note that the Probe_Request signal can also bereferred to as a network search signal for searching for a desirednetwork. The search signal transmitting unit 305 executes transmissionprocessing of a Probe_Request signal (to be described later). The searchsignal transmitting unit 305 also performs transmission processing of aProbe_Response signal as a response signal to a received Probe_Requestsignal.

Reference numeral 306 denotes a search signal receiving unit whichcontrols reception of apparatus search signals such as a Probe_Requestsignal from another terminal. The search signal receiving unit 306executes reception processing of a Probe_Request signal (to be describedlater). The search signal receiving unit 306 also performs receptionprocessing of a Probe_Response signal.

Reference numeral 307 denotes a network joining unit for joining anetwork. The network joining unit 307 executes a network joining process(to be described later).

In the communication parameter automatic setting functional block 302,reference numeral 308 denotes a communication parameter receiving unitwhich receives communication parameters transmitted from a communicationparameter provider.

Reference numeral 309 denotes an automatic setting control unit whichcontrols various protocols in communication parameter automatic setting.The communication parameter receiving unit 308 executes a communicationparameter automatic setting process (to be described later) under thecontrol of the automatic setting control unit 309.

Reference numeral 310 is a network specifying unit which specifies, inthe communication parameter automatic setting process, a network which acommunication parameter provider joins. The network specifying unit 310executes a network specifying process (to be described later).

Reference numeral 311 is a setting scheme determining unit whichdetermines a setting scheme to be used in the communication parameterautomatic setting process. The setting scheme determining unit 311determines whether the storage unit 103 stores an authentication codeinput from the input unit 109. If the storage unit 103 stores theauthentication code, the setting scheme determining unit 311 determinesto use the authentication code scheme; otherwise, the unit 311determines to use the non-authentication code scheme.

Note that all the software functional blocks are correlated with eachother in a software or hardware manner. The above functional blocks aremerely examples. A plurality of functional blocks may constitute onefunctional block, or any one of the functional blocks may be dividedinto a plurality of blocks each executing a function.

FIG. 4 is a view showing a terminal A 401 (to be referred to as terminalA hereinafter), a terminal B 402 (to be referred to as terminal Bhereinafter), a terminal C 403 (to be referred to as terminal Chereinafter), and an access point 404. FIG. 4 also shows a wireless LANad-hoc network 405 created by terminal A. Furthermore, FIG. 4 shows awireless LAN infrastructure network 406 created by the access point 404.

Terminal A, terminal B, and terminal C have a IEEE802.11 wireless LANcommunication function, and wirelessly communicate with each other bywireless LAN ad hoc communication. Terminal A has the configurationshown in FIGS. 1 and 2 described above. Each of terminal B and terminalC has the configuration shown in FIGS. 1 and 3.

Each terminal can wirelessly communicate with the access point byswitching a communication mode to an infrastructure communication mode.

The storage unit 103 of terminal A stores, in advance, the firstcommunication parameters for data communication on the network 405. Thestorage unit 103 of terminal A also stores, in advance, the secondcommunication parameters necessary for joining the network 406.

Terminal A is a communication parameter provider, and provides terminalB and terminal C with communication parameters. In this case, terminal Band terminal C are communication parameter acceptors.

Consider a case in which terminal C performs communication parameterautomatic setting by the non-authentication code scheme with terminal A,and executes data communication on the network 405 created by terminalA. Consider also a case in which terminal B performs communicationparameter automatic setting by the authentication code scheme withterminal A, and joins the network 406 created by the access point 404.

FIG. 5 is an operation flowchart for explaining processing when terminalA provides communication parameters by executing a communicationparameter automatic setting process. In the following explanation,assume that an apparatus which receives communication parameters is anacceptor (receiving apparatus). When the user operates the settingbutton of terminal A, the processing shown in FIG. 5 starts.

Once the processing starts, the setting scheme determining unit 208 ofterminal A checks the storage unit 103, and determines a communicationparameter automatic setting scheme to use (S501).

The network creating unit 207 of terminal A determines whether thenetwork 405 for ad-hoc communication has been created. If the network405 is not created, the unit 207 creates the network (S502 and S503).

After the network is created, when the search signal receiving unit 206of terminal A receives a Probe_Request signal, the search signaltransmitting unit 205 returns a Probe_Response signal which containsadditional information representing communication parameter automaticsetting.

After that, the automatic setting control unit 211 of terminal A waitsfor a start message of communication parameter automatic setting to betransmitted from an acceptor for a certain period of time (S504). If theunit 211 receives no start message until a certain period of timeelapses, the processing ends (S511).

If terminal A receives a start message of communication parameterautomatic setting, the automatic setting control unit 211 returns aresponse message to the acceptor, and starts a process of providing theacceptor with communication parameters (S505). The automatic settingcontrol unit 211 causes the communication parameter selection unit 210to select, based on the setting scheme determined in step S501,parameters to be provided to the acceptor. If the non-authenticationcode scheme is used, the automatic setting control unit 211 selects thefirst communication parameters as communication parameters to beprovided to the acceptor (S506 and S507). If the authentication codescheme is used, the automatic setting control unit 211 selects thesecond communication parameters as communication parameters to beprovided to the acceptor (S506 and S508).

If the non-authentication code scheme is used, the automatic settingcontrol unit 211 causes the communication parameter providing unit 209to provide the acceptor with the first communication parameters by thenon-authentication code scheme (S510), and ends the processing.

If the authentication code scheme is used, the automatic setting controlunit 211 exchanges messages with the acceptor, and determines whether anauthentication code input to the acceptor coincides with that input tothe self-terminal (S509). If the codes coincide with each other as aresult of the determination, the automatic setting control unit 211provides the acceptor with the second communication parameters by theauthentication code scheme (S510), and ends the processing; otherwise,the automatic setting control unit 211 ends the processing withoutproviding communication parameters.

Note that if the authentication code input from the input unit 109 isstored in the storage unit 103, the automatic setting control unit 211deletes the authentication code after providing the communicationparameters.

In the above explanation, if terminal A uses the non-authentication codescheme, the first communication parameters are selected. If terminal Auses the authentication code scheme, the second communication parametersare selected. The reason why the first communication parameters areselected in the case of the non-authentication code scheme is toprohibit a wired network connected with the access point 404 from beingaccessed. This is because the security level of the non-authenticationcode scheme is lower than that of the authentication code scheme (thenon-authentication code scheme is less secure). On the other hand, inthe case of the authentication code scheme, since the security level ishigher (the authentication code scheme is more secure), the wirednetwork connected with the access point 404 is allowed to be accessed.However, as for the communication parameters to be provided, the aboveexplanation may be reversed. That is, if the non-authentication codescheme is used, the second communication parameters may be selected. Ifthe authentication code scheme is used, the first communicationparameters may be selected. In this case, since only a terminal whichhas input a predetermined authentication code can execute communicationon the network 405, it is possible to use the network 405 as a networkwhich can be used by only the user who knows the authentication code.

FIG. 6 is an operation flowchart for explaining processing when terminalB receives communication parameters by executing a communicationparameter automatic setting process. When the user inputs anauthentication code in terminal B, and then operates the setting button,the processing shown in FIG. 6 starts.

After the processing starts, the setting scheme determining unit 311 ofterminal B checks the storage unit 103, and determines to use theauthentication code scheme (S601).

After the determination, the search signal transmitting unit 305 ofterminal B transmits a Probe_Request signal (S602).

Then, the search signal receiving unit 306 of terminal B waits for aProbe_Response signal, which contains additional informationrepresenting communication parameter automatic setting, to betransmitted from the provider (S603). If no Probe_Response signal whichcontains additional information representing communication parameterautomatic setting is transmitted until a certain period of time elapses,terminal B repeats transmission of a Probe_Request signal.

If the unit 306 receives a Probe_Response signal, the network specifyingunit 310 of terminal B specifies, based on information contained in theProbe_Response signal, the network identifier of the network created bythe provider (S604).

Upon specifying the network identifier, the network joining unit 307 ofterminal B joins the network created by the provider (S605). In thiscase, terminal B sets the network identifier specified in step S604, andjoins the network created by the provider. It is therefore possible tocommunicate for communication parameter automatic setting. Since anencryption method and an encryption key are not set, however, it isimpossible to communicate data on the network.

After joining the network, the automatic setting control unit 309 ofterminal B causes the communication parameter receiving unit 308 totransmit a start message of communication parameter automatic setting,and starts a process of receiving communication parameters from theprovider (S606).

After the process starts, The communication parameter receiving unit 308receives communication parameters from the provider by theauthentication code scheme using the authentication code which has beeninput in advance (S607). Note that after receiving the communicationparameters, the automatic setting control unit 309 deletes theauthentication code, which has been input from the input unit 109,stored in the storage unit 103.

FIG. 7 is an operation flowchart for explaining processing when terminalC receives communication parameters by executing a communicationparameter automatic setting process. Note that when the user operatesthe setting button of terminal C, the processing shown in FIG. 7 starts.

After the processing starts, the setting scheme determining unit 311 ofterminal C checks the storage unit 103, and determines to use thenon-authentication code scheme (S701).

After the determination, the search signal transmitting unit 305 ofterminal C transmits a Probe_Request signal (S702).

Then, the search signal receiving unit 306 of terminal C waits for aProbe_Response signal, which contains additional informationrepresenting communication parameter automatic setting, to betransmitted from the provider (S703). If no Probe_Response signal whichcontains additional information representing communication parameterautomatic setting is transmitted until a certain period of time elapses,terminal C repeats transmission of a Probe_Request signal.

If the unit 306 receives a Probe_Response signal, the network specifyingunit 310 of terminal C specifies, based on information contained in theProbe_Response signal, the network identifier of the network created bythe provider (S704).

Upon specifying the network identifier, the network joining unit 307 ofterminal C joins the network created by the provider (S705). In thiscase, terminal C sets the network identifier specified in step S704, andjoins the network created by the provider. It is therefore possible tocommunicate for communication parameter automatic setting. Since anencryption method and an encryption key are not set, however, it isimpossible to communicate data on the network.

After joining the network, the automatic setting control unit 309 ofterminal C causes the communication parameter receiving unit 308 totransmit a start message of communication parameter automatic setting,and starts a process of receiving communication parameters from theprovider (S706).

After the process starts, the communication parameter receiving unit 308receives communication parameters from the provider by thenon-authentication code scheme (S707).

FIG. 8 is a sequence chart showing processing when terminal B receivesthe communication parameters of the network 406 from terminal A, andjoins the network 406. In FIG. 8, assume that the processing starts in astate in which terminal A does not create the network 405.

When the user inputs an authentication code to terminal A, and thenoperates the setting button, terminal A starts the processing of FIG. 5.Upon start of the processing, terminal A determines to use theauthentication code scheme, and creates the network 405 (F801).

When the user inputs, to terminal B, the same authentication code asthat stored in terminal A, and then operates the setting button,terminal B starts the processing of FIG. 6. After that, terminal Bdetermines to use the authentication code scheme, transmits aProbe_Request signal (F802), and searches for a provider.

Terminal A which has received the Probe_Request signal transmitted inF802 returns, to terminal B, a Probe_Response signal to which anidentifier representing that terminal A has a communication parameterautomatic setting function is added (F803).

Terminal B which has received the Probe_Response signal to which theidentifier representing that terminal A has the communication parameterautomatic setting function is added detects and specifies the network405 created by terminal A, and then joins the network (F804). Afterjoining the network, terminal B transmits a start message ofcommunication parameter automatic setting (F805).

On the network 405, upon receiving the start message of communicationparameter automatic setting from terminal B, terminal A providesterminal B with the second communication parameters by theauthentication code scheme (F806).

After receiving the communication parameters, terminal B joins thenetwork 406 using the received second communication parameters, and endsthe processing (F807).

FIG. 9 is a sequence chart showing processing when terminal C receivesthe communication parameters of the network 405 from terminal A, andjoins the network 405. In FIG. 9, assume that the processing starts in astate in which terminal A does not create the network 405.

When the user operates the setting button of terminal A, terminal Astarts the processing of FIG. 5. Upon start of the processing, terminalA determines to use the non-authentication code scheme, and creates thenetwork 405 (F901).

When the user operates the setting button of terminal C, terminal Cstarts the processing of FIG. 7. Terminal C then determines to use thenon-authentication code scheme, transmits a Probe_Request signal (F902),and searches for a provider.

Terminal A which has received the Probe_Request signal transmitted inF902 returns, to terminal C, a Probe_Response signal to which anidentifier representing that terminal A has a communication parameterautomatic setting function is added (F903).

Terminal C which has received the Probe_Response signal to which theidentifier representing that terminal A has the communication parameterautomatic setting function is added detects and specifies the network405 created by terminal A, and then joins the network (F904).

After joining the network, terminal C transmits a start message ofcommunication parameter automatic setting (F905).

On the network 405, upon receiving the start message of communicationparameter automatic setting from terminal C, terminal A providesterminal C with the first communication parameters by thenon-authentication code scheme (F906).

After receiving the communication parameters, terminal C sets thereceived first communication parameters in itself, and enters a state inwhich it is possible to communicate data with terminal A (F907).

Note that although a case in which the first communication parametersare used for the ad-hoc network and the second communication parametersare used for the infrastructure network has been explained, both of thefirst and second parameters may be used for the infrastructure or ad-hocnetwork. Although the authentication code scheme and non-authenticationcode scheme have been described as examples of the setting scheme to beidentified, the present invention is not limited to them. For example,by operating the input unit 109, one of various setting schemes providedby various manufacturers may be identified and communication parametersmay be selected and provided in accordance with the identified settingscheme.

As described above, when providing an acceptor with communicationparameters, a provider automatically selects, based on a communicationparameter automatic setting scheme to use, communication parameters tobe provided. This allows the provider to easily and quickly select thecommunication parameters suitable for the acceptor. It is thereforepossible to efficiently and easily execute communication parameterautomatic setting for providing and receiving the communicationparameters.

Although the preferred embodiments of the present invention have beendescribed above, they are merely examples for explaining the presentinvention, and are not intended to limit the scope of the presentinvention. Various modifications can be made to the embodiments withoutdeparting from the spirit and scope of the present invention.

For example, in the above explanation of the embodiments, Probe_Requestand Probe_Response signals are used. However, signals to be transmittedare not limited to them, and other signals playing the same roles may beused.

An IEEE802.11 wireless LAN has been explained as an example. The presentinvention may, however, be implemented in another wireless medium suchas wireless USB, MBOA, Bluetooth®, UWB (Ultra Wide Band), or ZigBee. Thepresent invention may also be implemented in a wired communicationmedium such as a wired LAN.

Note that MBOA is an abbreviation for Multi Band OFDM Alliance. UWBincludes wireless USB, wireless 1394, and WINET.

Although a network identifier, encryption method, encryption key,authentication method, and authentication key are used as examples ofcommunication parameters, another information may be used and alsoincluded in communication parameters.

In the present invention, a storage medium which stores software programcodes for implementing the above-described functions may be supplied toa system or apparatus, and the computer (or the CPU or MPU) of thesystem or apparatus may read out and execute the program codes stored inthe storage medium. In this case, the program codes read out from thestorage medium implement the functions of the above-describedembodiments, and the storage medium which stores the program codesconstitutes the present invention.

The storage medium for supplying the program codes includes a flexibledisk, hard disk, optical disk, magnetooptical disk, CD-ROM, CD-R,magnetic tape, nonvolatile memory card, ROM, and DVD.

The above-described functions are implemented when the computer executesthe readout program codes. Also, the above-described functions may beimplemented when an OS running on the computer performs some or all ofactual processes on the basis of the instructions of the program codes.OS is an abbreviation for an Operating System.

Furthermore, the above-described functions may be implemented when theprogram codes read out from the storage medium are written in the memoryof a function expansion board inserted into the computer or the memoryof a function expansion unit connected to the computer, and the CPU ofthe function expansion board or function expansion unit performs some orall of actual processes on the basis of the instructions of the programcodes.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2008-005811, filed Jan. 15, 2008, which is hereby incorporated byreference herein in its entirety.

The invention claimed is:
 1. A communication apparatus comprising: astorage unit configured to store first communication parameters towirelessly communicate in a first wireless network complying with anIEEE802.11 standard and second communication parameters to wirelesslycommunicate in a second wireless network complying with an IEEE802.11standard, wherein the first communication parameters include a firstwireless network identifier, a first encryption method, and a firstencryption key, and the second communication parameters include a secondwireless network identifier, a second encryption method, and a secondencryption key; a determination unit configured to determine whether acommunication parameter setting scheme used to provide a partnerapparatus with communication parameters is either an authentication codescheme requiring an authentication code input to the communicationapparatus by a user or a non-authentication code scheme not requiringthe authentication code input by the user but requiring a pushing ofboth a first predetermined button on the communication apparatus and asecond predetermined button on the partner apparatus by the user; aselection unit configured to select, from the communication parametersstored in the storage unit, any one of the first communicationparameters and the second communication parameters in accordance withthe setting scheme determined by the determination unit; and a providingunit configured to provide the partner apparatus with the communicationparameters selected by the selection unit.
 2. The apparatus according toclaim 1, wherein the selection unit selects the first communicationparameters when the authentication code scheme is determined by thedetermination unit, and selects the second communication parameters whenthe non-authentication code scheme is determined by the determinationunit.
 3. The apparatus according to claim 1, wherein the selection unitselects the first communication parameters when the non-authenticationcode scheme is determined by the determination unit, and selects thesecond communication parameters when the authentication code scheme isdetermined by the determination unit.
 4. The apparatus according toclaim 1, wherein the first wireless network is an ad hoc network and thesecond wireless network is an infrastructure network.
 5. The apparatusaccording to claim 1, wherein the first wireless network is created bythe communication apparatus and the second wireless network is createdby an access point.
 6. The apparatus according to claim 1, wherein thecommunication apparatus and the partner apparatus communicate directlyin the first network, and the communication apparatus and the partnerapparatus communicate via an access point in the second network.
 7. Acontrol method for a communication apparatus, comprising: determiningwhether a communication parameter setting scheme used to provide apartner apparatus with communication parameters is either anauthentication code scheme requiring an authentication code input to thecommunication apparatus by a user or a non-authentication code schemenot requiring the authentication code input by the user but requiring apushing of both a first predetermined button by the user on thecommunication apparatus and a second predetermined button on the partnerapparatus; selecting any one of first communication parameters towirelessly communicate in a first wireless network complying with anIEEE802.11 standard and second communication parameters to wireles slycommunicate in a second wireless network complying with an IEEE802.11standard in accordance with the determined setting scheme, wherein thefirst communication parameters include a first wireless networkidentifier, a first encryption method, and a first encryption key, andthe second communication parameters include a second wireless networkidentifier, a second encryption method and a second encryption key; andproviding the partner apparatus with the selected communicationparameters.
 8. A non-transitory computer-readable storage medium storinga computer program for causing a communication apparatus to execute thecontrol method according to claim 7.